#!/bin/bash

# NOTE: some values not explicitly given are taken from preferences.txt i.e.
# the last time the GUI was used. See also manpage.adoc.

if [ "X$1" == 'Xupload' ] ; then
    $HOME/arduino/arduino \
        --pref build.path=/tmp/arduino_build \
        --preserve-temp-files \
        --upload \
        ./*.ino
else
    $HOME/arduino/arduino \
        --pref build.path=/tmp/arduino_build \
        --preserve-temp-files \
        --verify \
        ./*.ino
fi
